package org.hzero.order.domain.entity;

import java.util.Date;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.Table;
import javax.validation.constraints.NotBlank;

import com.fasterxml.jackson.annotation.JsonInclude;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.hibernate.validator.constraints.Length;

import io.choerodon.mybatis.annotation.ModifyAudit;
import io.choerodon.mybatis.annotation.VersionAudit;
import io.choerodon.mybatis.domain.AuditDomain;

/**
 * @author xiuiqng.Yang-Estelle-양수청
 * @date 2019/8/5 13:39
 */

/**
 * 实体类
 */
@ApiModel("物料信息")
@ModifyAudit
@VersionAudit
@JsonInclude(JsonInclude.Include.NON_NULL)
@Table(name = "hodr_item")
@Data
public class Item extends AuditDomain {

    @Id
    @GeneratedValue
    private Long itemId;

    @NotBlank
    @Length(max = 60)
    @ApiModelProperty("物料编码")
    private String itemCode;

    @NotBlank
    @Length(max = 60)
    @ApiModelProperty("物料单位")
    private String itemUom;

    @NotBlank
    @Length(max = 240)
    @ApiModelProperty("物料描述")
    private String itemDescription;

    @ApiModelProperty("可销售标识")
    private Boolean saleableFlag;

    @ApiModelProperty("生效起始时间")
    private Date startActiveDate;

    @ApiModelProperty("生效结束时间")
    private Date endActiveDate;

    @ApiModelProperty("启用标识")
    private Boolean enabledFlag;

}
